<HTML><HEAD><TITLE>plot(++Data, +Options, +Format, +OutputFile)</TITLE>
</HEAD><BODY>[ <A HREF="index.html">library(gnuplot)</A> | <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]
<H1>plot(++Data, +Options, +Format, +OutputFile)</H1>
Plots the given data to a file in the given format.
<DL>
<DT><EM>Data</EM></DT>
<DD>The data to be plotted, array or list.
</DD>
<DT><EM>Options</EM></DT>
<DD>Options list
</DD>
<DT><EM>Format</EM></DT>
<DD>Output file format (atom or string)
</DD>
<DT><EM>OutputFile</EM></DT>
<DD>Name fo file to store plot in (atom or string)
</DD>
</DL>
<H2>Description</H2>

<P> Plots the data to a file in the specified format.

<P> The Data can either be a list or a nested list of a 1D or 2D array
 of y values or x-y points.

<P> The output format is defined as being the 'terminal' setting for
 gnuplot.

<P> Syntax note: wherever gnuplot expects a string as an option value,
 use a double-quoted ECLiPSe string - unquoted or single-quoted atoms
 will not work!.

<H3>Fail Conditions</H3>
Options are malformed, or data is not in a valid format.
<H3>Resatisfiable</H3>
false
<H2>Examples</H2>
<PRE>
% multiple t-r pairs, in polar coordinates with a grid and lines, into
% a postscript file
?- A=[[1-3,5-2,9-2,8-2,5-7], [1-2,5-4,8-6,9-1,12-4]],
   plot(A,[set:[polar, grid=polar], with:lines], postscript, "polar.ps").

% multiple t-r pairs, in polar coordinates with a grid and lines, into
% a postscript file with color
?- A=[[1-3,5-2,9-2,8-2,5-7], [1-2,5-4,8-6,9-1,12-4]],
   plot(A,[set:[polar, grid=polar], with:lines], "postscript color", "polar.ps").

% multiple t-r pairs, in polar coordinates with a grid and lines, into
% a PNG file
?- A=[[1-3,5-2,9-2,8-2,5-7], [1-2,5-4,8-6,9-1,12-4]],
   plot(A,[set:[polar, grid=polar], with:lines], png, "polar.png").

% multiple t-r pairs, in polar coordinates with a grid and lines, into
% a XFIG file
?- A=[[1-3,5-2,9-2,8-2,5-7], [1-2,5-4,8-6,9-1,12-4]],
   plot(A,[set:[polar, grid=polar], with:lines], fig, "polar.fig").
</PRE>
<H2>See Also</H2>
<A HREF="../../lib/gnuplot/plot-1.html">plot / 1</A>, <A HREF="../../lib/gnuplot/plot-2.html">plot / 2</A>, <A HREF="../../lib/gnuplot/plot-3.html">plot / 3</A>
</BODY></HTML>
